/*
 * Copyright 2010 Guillaume Amringer
 * 
 * This file is part of WLoader.
 * 
 * WLoader is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * WLoader is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with WLoader.  If not, see <http://www.gnu.org/licenses/>.
 * */
package ga.wloader.events {
	import flash.events.Event;
	
	public class WNetEvent extends Event {
		
		public static const CONNECTED:String = 'wnet.connected';
		public static const CONNECTION_FAILED:String = 'wnet.connection_failed';
		public static const META_DATA:String = 'wnet.meta_data';
		public static const READY:String = 'wnet.ready';
		public static const ITEM_READY:String = 'wnet.item_ready';
		public static const LOADED:String = 'wnet.loaded';
		public static const ITEM_LOADED:String = 'wnet.item_loaded';
		
		private var _item:Object;
		
		public function WNetEvent(pType:String, pItem:Object = null) { 
			super(pType);
			_item = pItem;
		}
		
		public override function clone():Event {
			return new WNetEvent(type, _item);
		}
		public function get item():Object {
			return _item;
		}
	}
}
